﻿using System;
using System.Windows.Controls;

namespace ColorReminder.Phone
{
    public partial class Bumper : UserControl
    {
        public Bumper()
        {
            InitializeComponent();

            _highlight.Completed += (s, e) =>
                {
                    OnHighlightFinished();
                };
        }

        public void Highlight()
        {
            _highlight.Begin();
        }

        private void OnHighlightFinished()
        {
            if (HighlightFinished != null)
            {
                HighlightFinished(this, EventArgs.Empty);
            }
        }

        public event EventHandler HighlightFinished;

        public string Text
        {
            get
            {
                return _text.Text;
            }
            set
            {
                _text.Text = value;
            }
        }
    }
}
